<?php
	include '../../db.php';
	if((isset($_GET['action']))&&(isset($_GET['iid']))){
		$itemId = $_GET['iid'];
		if($_GET['action'] == 'remove'){
			$sql = "UPDATE items SET isActive=0 WHERE itemId='$itemId'";
			$url_target = 'Location:../../led-master.php?mngr=prod&subpg=update&action=delsuccess';	
		}else if($_GET['action'] == 'restore'){
			$sql = "UPDATE items SET isActive=1 WHERE itemId='$itemId'";
			$url_target = 'Location:../../led-master.php?mngr=prod&subpg=update&action=ressuccess';
		}
		@mysql_query($sql);		 
		header($url_target);
	}
?>